home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / July 96 / Re Destroying Proxy Frames.1 < prev    next >
Encoding:
Internet Message Format  |  1996-07-09  |  2.1 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Destroying Proxy Frames
  2. Sent:        7/9/96 1:08 PM
  3. Received:    7/9/96 12:21 PM
  4. From:        Scott Anderson, scotta@aw.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8.  
  9. >What's concerning me about your fix is that if fAttached is true then 
  10. >inLimbo should be false (an attached embedded frame is not inLimbo). This 
  11. >means that you never execute the first if statement and never remove 
  12. >unused embedded frames. 
  13.  
  14. D'oh.
  15.  
  16. Fortunately I found a solution to the problem that doesn't involve that 
  17. little hack.
  18.  
  19. >How do you detach embedded frames? is it the result of an undoable action 
  20. >(like cut or drag/move)?
  21.  
  22. My part is a nav-aware part that can be opened into a navigator part.  I 
  23. detach my parts embedded frames when my part is embedded in the navigator 
  24. and then a new part is swapped into the navigator.  At that point my 
  25. part's display frame is used to display the new part via a ChangePart() 
  26. call so I detach my embedded frames to prevent them from being destroyed.
  27.  
  28. The problem of removing vs. releasing the embedded frames came up during 
  29. my attempts at replacing Cyberdog's standard navigator part.  When I was 
  30. closing my navigator I was simply purging the "cyber draft" that the 
  31. Cyberdog session maintains.  This draft contained all of the parts in the 
  32. history list of the navigator.  I found the problem tracing through the 
  33. OpenDoc source code.  In CMDraftPurge() there is an iterator that got out 
  34. of synch when my nav-aware part got removed from the draft and destroyed 
  35. it in turn removed its embedded frame from the draft.  This action 
  36. incrimented the hash table's seed but didn't incriment the iterator's 
  37. seed.  It is so very helpful to have the OpenDoc source code in such 
  38. situations.  I wish that the powers that be would realize that Cyberdog 
  39. development could be escalated with the availability of the source.
  40.  
  41. My solution was to remove each of the parts in the history list before 
  42. purging the draft of the other persistant objects that Cyberdog maintains 
  43. which is what it seems that the standard navigator does.
  44.  
  45. -Scott
  46.